<?php
include "../proses/konek.php";
session_start();

if(!isset($_SESSION['username']))
   {   
   ?><script language="javascript">alert('anda blm login');
document.location='../'</script><?php
 }
else
{
$username = $_SESSION['username'];
$status = $_SESSION['status'];
}
$simpan2=mysql_query("SELECT * FROM  $status where email = '$username'");
$hasil2=mysql_fetch_array($simpan2);
?>
<html>
<head>
    <meta content="IE=edge" http-equiv="X-UA-Compatible"></meta>

<meta content="width=device-width, initial-scale=1" name="viewport"></meta>

<meta content="" name="description"></meta>

<meta content="" name="author"></meta>
    <link rel="stylesheet" type="text/css" href="../css/sidebar.css">
	
	<!-- <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700" /> -->
	
	<!-- The main CSS file -->
    <link rel="stylesheet" href="../css/bootstrap/css/bootstrap.css" >
	<link rel="stylesheet" href="../css/bootstrap/css/bootstrap.min.css" >
	<link rel="stylesheet" href="../css/bootstrap/css/profile.css" >
	<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
	<link rel="stylesheet" href="../css/bootstrap/css/bootstrap-theme.min.css">
	<script type="text/javascript" src="../plugin/tinymce/tinymce.min.js"></script>
	<link rel="stylesheet" type="text/css" href="../css/meisMenu.css">
  

	<title></title>
</head>
<body style="overflow-x:hidden; " class="background">
<?php	
	require_once('../render.php');
	$render=new render;
	$render->icon();
	$render->navigasi();
	$render->profile($status, $username);
	
?>
<div id="wrapper">
<div id="sidebar-wrapper">
		<?php
		include ('menuslide.php');
		$menu=new menu;
		$menu->init($username, $status);
		?>
	</div>
		
	

	<div id="page-content-wrapper">
		<div class="container-fluid">
			<div class="row" style="margin-top:80px">
				<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12" id="subcontent">
					

					<!-- tinymce editor plugin -->
				
					<script>
					tinymce.init({
					    selector: "textarea#editor",
					    theme: "modern",
					    width: 700,
					    height: 300,
					    plugins: [
					         "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
					         "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
					         "save table contextmenu directionality emoticons template paste textcolor jbimages responsivefilemanager"
					   ],
					   content_css: "css/content.css",
					   toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons responsivefilemanager", 
					   style_formats: [
					        {title: 'Bold text', inline: 'b'},
					        {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
					        {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
					        {title: 'Example 1', inline: 'span', classes: 'example1'},
					        {title: 'Example 2', inline: 'span', classes: 'example2'},
					        {title: 'Table styles'},
					        {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
					    ],

					   external_filemanager_path:"/elearning/plugin/filemanager/",
					   filemanager_title:"Responsive Filemanager" ,
					   external_plugins: { "filemanager" : "/elearning/plugin/filemanager/plugin.min.js"}
					 }); 
					</script>
					<h3>POSTING</h3>
				<div class="">
					<form class="form-horizontal"  action="../proses/post_posting.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
						<div class="form-group">
							<label class="col-sm-2 control-label">Judul Posting</label>
							<div class="col-sm-9">
								<input class="form-control" type="text" name="judul" placeholder="Judul Postingan" required>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">Pelajaran</label>
							<div class="col-sm-9">
								<input class="form-control" type="text" name="mapel" placeholder="Kategori Mata Pelajaran">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">Kelas</label>
							<div class="col-sm-9">
								<input class="form-control" type="text" name="kls" placeholder="Target tingkatan atau Kelas">
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">file</label>
							<div class="col-sm-9">
								<input class="form-control" type="text" name="file1" placeholder="pilih file" id="file1">
								 <a href="javascript:open_popup('../plugin/filemanager/dialog.php?type=1&popup=1&field_id=file1')" class="btn iframe-btn btn-success" type="button" name="select1">select</a>
								 <a href="" class="btn iframe-btn btn-success" type="button" name="select1" onclick="add()">ADD</a>
								 <input class="form-control" type="text" name="file2" placeholder="pilih file" id="file2">
								 <a href="javascript:open_popup('../plugin/filemanager/dialog.php?type=1&popup=1&field_id=file2')" class="btn iframe-btn btn-success" type="button" name="select1">select</a>
								 <input class="form-control" type="text" name="file3" placeholder="pilih file" id="file3">
								 <a href="javascript:open_popup('../plugin/filemanager/dialog.php?type=1&popup=1&field_id=file3')" class="btn iframe-btn btn-success" type="button" name="select1">select</a>
								 <input class="form-control" type="text" name="file4" placeholder="pilih file" id="file4">
								 <a href="javascript:open_popup('../plugin/filemanager/dialog.php?type=1&popup=1&field_id=file4')" class="btn iframe-btn btn-success" type="button" name="select1">select</a>
								 <input class="form-control" type="text" name="file5" placeholder="pilih file" id="file5">
								 <a href="javascript:open_popup('../plugin/filemanager/dialog.php?type=1&popup=1&field_id=file5')" class="btn iframe-btn btn-success" type="button" name="select1">select</a>
							</div>
						</div>
						<div class="form-group">
							<label class="col-sm-2 control-label">Isi Postingan</label>
							<div class="col-sm-10">
								<textarea id="editor" name="area"></textarea>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<button class="btn btn-primary" type="submit" name="save" id="save">Publish</button>
							</div>
						</div>
						</form>
						 
					</div>
				</div>
			</div>	
		</div>		 
	</div>
</div>
<div>
	<?php
	$render->footer();
	?>
</div>
<!-- JQuery Core -->
<script src="../js/search.js"></script>
<script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script>
		
<script type="text/javascript" src="../css/bootstrap/js/bootstrap.js"></script>
<!-- Custom Sidebar Javascript--> 
<script type="text/javascript" src="../js/metisMenu.min.js"></script>
<script src="../js/sb-admin-2.js"></script>
<script type="text/javascript" src="../js/sidebar.js"></script>
<!-- Custom Javascript Load Page-->
<script src="../js/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
            function open_popup(url) {
                var w = 880;
                var h = 600;
                var l = Math.floor((screen.width-w)/2);
                var t = Math.floor((screen.height-h)/2);
                var win = window.open(url, 'ResponsiveFilemanager', "scrollbars=1,width=" + w + ",height=" + h + ",top=" + t + ",left=" + l);
            }
        </script>

	</body>
</html>

	
